#ifndef _DOUBLELINKLIST_H_
#define _DOUBLELINKLIST_H_
#include <iostream>
#include <stddef.h>

class DoubleLinkList
{
public:
    using ElementType = int;
    DoubleLinkList();
    // 拷贝构造赋值运算符重载
    ~DoubleLinkList();
    void InsertTail(const ElementType & element);
    void InsertByIndex(size_t index,const ElementType& element);

    //删除 2个
    //查找 2个
    //修改 2个

    //排序 快速排序 


    void show();
private:
    struct  Node
    {
        Node(const ElementType& value)
        {
            this->value = value;
            next = prev = nullptr;
        }
        ElementType value;
        Node *next;//后驱指针
        Node *prev;//前驱指针
    };
    
    Node *head; //头指针
    Node *tail; //尾指针
    size_t size;
};

#endif